package com.jiangyao.model.dto.backend;

import com.jiangyao.model.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 章节对象DTO
 *
 * @author: yangyongchuan
 * @create: 2020年08月24日 23:04
 */
@ApiModel("章节对象DTO")
@Data
public class ChapterItemDTO implements BaseDTO {

	private static final long serialVersionUID = -3130085110571701911L;
	/**
	 * 章节ID
	 */
	@ApiModelProperty("章节ID")
	private Integer chapterId;

	/**
	 * 章节名称
	 */
	@ApiModelProperty("章节名称")
	@NotNull(message = "章节名称不能为空", groups = {Edit.class})
	@NotEmpty(message = "章节名称不能为空", groups = {Edit.class})
	private String chapterName;

	/**
	 * 试题ID
	 */
	@ApiModelProperty("试题ID")
	private Integer questionsId;

	/**
	 * 排序
	 */
	@ApiModelProperty("排序")
	@NotNull(message = "章节课件列表不能为空", groups = {Edit.class})
	private Integer sortOrder = 0;

	/**
	 * 章节课件列表
	 */
	@ApiModelProperty("章节课件列表")
	@NotNull(message = "章节课件列表不能为空", groups = {Edit.class})
	private List<ChapterCoursewareDTO> coursewareList;
}
